package cn.printer;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author oldliu
 * @since 1.0
 */
public class TestPrinter {
    public static void main(String[] args) {
//        Printer p=new Printer();
//        p.print("你好，java");
//        p.setInk(new ColorFulInk());
        ApplicationContext context=new ClassPathXmlApplicationContext("applicatonContext.xml");
        Printer printer = context.getBean("printer", Printer.class);
        printer.print("helloworld");
    }
}
